//
//  HYTextField.h
//  HaiYue
//
//  Created by skyline on 2018/1/9.
//  Copyright © 2018年 skyline. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger,HYTextFieldType)
{
    HYTextFieldTypeDefault = 1,
    HYTextFieldTypeAccount,
    HYTextFieldTypePhone,
    HYTextFieldTypeName,
    HYTextFieldTypePassword,
    HYTextFieldTypeVerifyCode,
    HYTextFieldTypeSearch
    
};
@protocol HYTextFieldDelegate <UITextFieldDelegate>
/**
 * @pragma height < 0 textfield被keyboard挡住，height > 0 textfield没有被keyboard挡住
 */
- (void)heightWhenKeyboardChange:(CGFloat)height animationInterval:(float)time;
- (BOOL)shouldVerifycationCode;
@end

@interface HYTextField : UITextField
@property (nonatomic, weak) id<HYTextFieldDelegate>hydelegate;
@property (nonatomic, assign) BOOL verify;
@property (nonatomic, strong) UIColor *placeholderColor;
@property (nonatomic, strong) UIFont *placeholderFont;
@property (nonatomic, assign) HYTextFieldType type;
- (instancetype)initWithPlaceholder:(NSString *)placeholder;
- (void)stopTimer;
@end
